/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package engine;

import java.util.List;
import java.util.Set;

import controller.Manager;
import controller.human.Action;
import controller.human.User;
import java.awt.*;
import java.awt.geom.Line2D;
import java.io.*;
import java.util.ArrayList;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class LinePanel extends JPanel{
         Point[] lineKillersArray;
         Point[] lineCitizensArray;
        
         Point lineStart = new Point(0, 0);
         Point lineEnd = new Point(0, 0);
  
         Line2D lineOX = new Line2D.Double(lineStart, lineEnd);
         Line2D lineOY = new Line2D.Double(lineStart, lineEnd);
         //width of line
         private Stroke stroke = new BasicStroke(2.0f);
        
         LinePanel(){
             super();
             
         }
         //draw line
        @Override
         public void paintComponent(Graphics g)
             {
             super.paintComponent(g);
             Graphics2D g2 = (Graphics2D) g;
             g2.setStroke(stroke);
             g2.setColor(Color.BLACK);
         
             g2.draw(lineOX);
             g2.draw(lineOY);
             g2.setColor(Color.RED);
             Point start = lineKillersArray[0];
      
             for(int i = 1; i < lineKillersArray.length; i++){
                g2.draw(new Line2D.Double(start,lineKillersArray[i] ));
              
                start = lineKillersArray[i];
             }
             
             g2.setColor(Color.GREEN);
             Point first = lineCitizensArray[0];
          
             for(int i = 1; i < lineCitizensArray.length; i++){
                g2.draw(new Line2D.Double(first,lineCitizensArray[i] ));
                
                first = lineCitizensArray[i];
                
                //draw the round points on OX
                Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                g2.fillOval(first.x , screenSize.height - 200 - 3, 6, 6);
             }
         }
       
   }
